<template>
    <div class="category">
        <nav-bar class="nav-bar">
            <div slot="center">购物车({{cartLength}})</div>
        </nav-bar>
        <categorylb></categorylb>
        <category-ba></category-ba>
    </div>
</template>

<script>
import NavBar from 'components/common/navbar/NavBar'

import Categorylb from './childComps/Categorylb'
import CategoryBa from './childComps/CategoryBa'



export default {
    name:'Category',
    components:{
        NavBar,
        Categorylb,
        CategoryBa
        
       
    },
    computed:{
        //购物车商品的数量
        cartLength(){
            return this.$store.state.cartList.length
        }
    }
}
</script>

<style scoped>
.nav-bar{
    position: relative;
    top: 0;
    z-index: 999;
    background-color: var(--color-tint);
    color: #fff;
}
</style>